package com.songwo.core.web.system;

import com.songwo.core.primary.entity.system.SysUser;
import com.songwo.util.UserUtils;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zhongzheng
 * @description 登录控制器
 * @date 2018/5/28 16:03
 */
@Log4j2
@Controller
public class LoginController {

    @RequestMapping(value = {"/", "index"})
    public ModelAndView index(HttpServletRequest request) {
        SysUser sysUser = UserUtils.getUser();
        return null;
    }

    @ResponseBody
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public String login(String username, String password) {

        return "success";
    }
}
